hope it doesn't happen again...
Home About Projects Blog Games Contact SupportAn Alpine Linux edge kernel upgrade (or another update, maybe only the grub package) broke grub booting sometime in the past few weeks, between lts kernels 6.6.8-6.6.11. Thankfully only needed to reinstall/configure grub to fix. So this page is if I have to do that again, but hopefully not.
Used a spare usb with alpine "live" environ (or can use ubuntu or anything else).
The fix ended up being this, with my broken alpine partition at /dev/nvme0n1p3
, and /boot partition
at /dev/nvme0n1p1
. Change as needed.
Also assuming grub has been used before and the 'grub' package is installed from e.g.
doas apk add grub
. You may also need efibootmgr: doas apk add efibootmgr
.
mkdir mnt
mount /dev/nvme0n1p3 mnt/
mount --rbind /dev/ mnt/dev
mount --rbind /proc/ /mnt/proc
mount --rbind /sys/ /mnt/sys
chroot mnt/
mount /dev/nvme0n1p1 /boot
grub-install \
--target=x86_64-efi \
--bootloader-id=alpine \
--efi-directory=/boot/efi
After doing that, I exit-ed and reboot-ed, and grub and alpine booted up just fine.